﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Expo.Training.Entity;
using PPTech.ESP.DataProvider;
using Expo.Training.BRule.News;
using Expo.Training.BRule.Access;
using System.Collections.Generic;
using Expo.Training.DataAccess.Special;
using System.IO;

public partial class XB_Special_Default : System.Web.UI.Page
{
    /// <summary>
    /// 页面大小
    /// </summary>
    public int PAGE_SIZE = 3;


    /// <summary>
    /// 当前页
    /// </summary>
    public int PageIndex;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Bind();
        }
    }

    public void Bind()
    {
        int totalCount = 0;
        DateTime beginDate = Convert.ToDateTime("1900-01-01");
        DateTime endDate = Convert.ToDateTime("1900-01-01");
        DataTable dt = SpecialManager.GetSpecialList("Number > 0 AND Number < 101", exPage_Bottom.CurrentPageIndex, PAGE_SIZE, out totalCount, "AddTime DESC", "", beginDate, endDate);
        if (totalCount > 0)
        {
            dv_Result.Visible = true;
            dv_NoResult.Visible = false;
            litSpecialCount.Text = totalCount.ToString();
            exPage_Bottom.RecordCount = totalCount;
            rpt_SpecialList.DataSource = dt;
            rpt_SpecialList.DataBind();
        }
        else
        {
            dv_Result.Visible = false;
            dv_NoResult.Visible = true;
        }

    }
    protected void exPage_Bottom_PageChanged(object sender, EventArgs e)
    {
        Bind();
    }
}
